#!/bin/bash
source /root/admin-openrc
judge_status=`glance image-list |grep cirros |head -1 |awk '{ print $1}'`
if [ $judge_status ];then
	exit 0
else
openstack image create "cirros" \
--file /tmp/cirros-0.3.5-x86_64-disk.img \
--disk-format qcow2 --container-format bare \
--public
fi
